package com.hmall.item.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author zx
 * @date 2021/11/9 9:25
 */
@Configuration
public class MVCInterceptor implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ItemInterceptor()).addPathPatterns("/**");
    }
}
